<?php
session_start();

$name = $_POST['deleteName'];

include 'DBLibrary/config.php';
include 'DBLibrary/openDB.php';

    mysql_select_db("rotaract");
    
    $query="DELETE FROM activity WHERE title = '$name'";
    $result = mysql_query($query)or die(mysql_error());
    if($result != false){
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Rotaract DLSU</title>
<meta http-equiv="Content-Type" content="text/html"/>
<meta name="robots" content="index,follow"/>
<meta name="distribution" content="global"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="container2">
  <div id="main2">
      <br/>
      <br/>
      <h3>&nbsp;&nbsp;&nbsp;Activity deletion successful!</h3>
</div>
</div>
</body>
</HTML>
       
    <?
    }
    else{
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Rotaract DLSU</title>
<meta http-equiv="Content-Type" content="text/html"/>
<meta name="robots" content="index,follow"/>
<meta name="distribution" content="global"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="container2">
  <div id="main2">
      <br/>
      <br/>
      <h3> &nbsp;&nbsp;&nbsp;Activity does not exist.</h3>
</div>
</div>
</body>
</HTML>    
    <?
        
    }
?>
